// Generated from code/ch19/Cymbol.g by ANTLR 4.9.0-SNAPSHOT


import { ATN } from "antlr4ts/atn/ATN";
import { ATNDeserializer } from "antlr4ts/atn/ATNDeserializer";
import { FailedPredicateException } from "antlr4ts/FailedPredicateException";
import { NotNull } from "antlr4ts/Decorators";
import { NoViableAltException } from "antlr4ts/NoViableAltException";
import { Override } from "antlr4ts/Decorators";
import { Parser } from "antlr4ts/Parser";
import { ParserRuleContext } from "antlr4ts/ParserRuleContext";
import { ParserATNSimulator } from "antlr4ts/atn/ParserATNSimulator";
import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener";
import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor";
import { RecognitionException } from "antlr4ts/RecognitionException";
import { RuleContext } from "antlr4ts/RuleContext";
//import { RuleVersion } from "antlr4ts/RuleVersion";
import { TerminalNode } from "antlr4ts/tree/TerminalNode";
import { Token } from "antlr4ts/Token";
import { TokenStream } from "antlr4ts/TokenStream";
import { Vocabulary } from "antlr4ts/Vocabulary";
import { VocabularyImpl } from "antlr4ts/VocabularyImpl";

import * as Utils from "antlr4ts/misc/Utils";

import { CymbolListener } from "./CymbolListener";
import { CymbolVisitor } from "./CymbolVisitor";


export class CymbolParser extends Parser {
	public static readonly T__0 = 1;
	public static readonly T__1 = 2;
	public static readonly T__2 = 3;
	public static readonly T__3 = 4;
	public static readonly T__4 = 5;
	public static readonly T__5 = 6;
	public static readonly T__6 = 7;
	public static readonly T__7 = 8;
	public static readonly T__8 = 9;
	public static readonly T__9 = 10;
	public static readonly T__10 = 11;
	public static readonly T__11 = 12;
	public static readonly T__12 = 13;
	public static readonly T__13 = 14;
	public static readonly T__14 = 15;
	public static readonly T__15 = 16;
	public static readonly T__16 = 17;
	public static readonly T__17 = 18;
	public static readonly T__18 = 19;
	public static readonly ID = 20;
	public static readonly INT = 21;
	public static readonly WS = 22;
	public static readonly SL_COMMENT = 23;
	public static readonly RULE_compilationUnit = 0;
	public static readonly RULE_varDeclaration = 1;
	public static readonly RULE_methodDeclaration = 2;
	public static readonly RULE_formalParmeters = 3;
	public static readonly RULE_block = 4;
	public static readonly RULE_structDeclaration = 5;
	public static readonly RULE_structMember = 6;
	public static readonly RULE_classDefinition = 7;
	public static readonly RULE_superClass = 8;
	public static readonly RULE_classMember = 9;
	public static readonly RULE_statement = 10;
	public static readonly RULE_expressionList = 11;
	public static readonly RULE_expression = 12;
	public static readonly RULE_addExpression = 13;
	public static readonly RULE_postfixEpression = 14;
	public static readonly RULE_functionCall = 15;
	public static readonly RULE_fieldsCall = 16;
	public static readonly RULE_methodCall = 17;
	public static readonly RULE_primary = 18;
	public static readonly RULE_type = 19;
	// tslint:disable:no-trailing-whitespace
	public static readonly ruleNames: string[] = [
		"compilationUnit", "varDeclaration", "methodDeclaration", "formalParmeters", 
		"block", "structDeclaration", "structMember", "classDefinition", "superClass", 
		"classMember", "statement", "expressionList", "expression", "addExpression", 
		"postfixEpression", "functionCall", "fieldsCall", "methodCall", "primary", 
		"type",
	];

	private static readonly _LITERAL_NAMES: Array<string | undefined> = [
		undefined, "'='", "';'", "'('", "')'", "','", "'{'", "'}'", "'struct'", 
		"'class'", "':'", "'public'", "'return'", "'+'", "'.'", "'this'", "'super'", 
		"'float'", "'int'", "'void'",
	];
	private static readonly _SYMBOLIC_NAMES: Array<string | undefined> = [
		undefined, undefined, undefined, undefined, undefined, undefined, undefined, 
		undefined, undefined, undefined, undefined, undefined, undefined, undefined, 
		undefined, undefined, undefined, undefined, undefined, undefined, "ID", 
		"INT", "WS", "SL_COMMENT",
	];
	public static readonly VOCABULARY: Vocabulary = new VocabularyImpl(CymbolParser._LITERAL_NAMES, CymbolParser._SYMBOLIC_NAMES, []);

	// @Override
	// @NotNull
	public get vocabulary(): Vocabulary {
		return CymbolParser.VOCABULARY;
	}
	// tslint:enable:no-trailing-whitespace

	// @Override
	public get grammarFileName(): string { return "Cymbol.g"; }

	// @Override
	public get ruleNames(): string[] { return CymbolParser.ruleNames; }

	// @Override
	public get serializedATN(): string { return CymbolParser._serializedATN; }

	protected createFailedPredicateException(predicate?: string, message?: string): FailedPredicateException {
		return new FailedPredicateException(this, predicate, message);
	}

	constructor(input: TokenStream) {
		super(input);
		this._interp = new ParserATNSimulator(CymbolParser._ATN, this);
	}
	// @RuleVersion(0)
	public compilationUnit(): CompilationUnitContext {
		let _localctx: CompilationUnitContext = new CompilationUnitContext(this._ctx, this.state);
		this.enterRule(_localctx, 0, CymbolParser.RULE_compilationUnit);
		let _la: number;
		try {
			this.enterOuterAlt(_localctx, 1);
			{
			this.state = 46;
			this._errHandler.sync(this);
			_la = this._input.LA(1);
			while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << CymbolParser.T__7) | (1 << CymbolParser.T__8) | (1 << CymbolParser.T__16) | (1 << CymbolParser.T__17) | (1 << CymbolParser.T__18) | (1 << CymbolParser.ID))) !== 0)) {
				{
				this.state = 44;
				this._errHandler.sync(this);
				switch ( this.interpreter.adaptivePredict(this._input, 0, this._ctx) ) {
				case 1:
					{
					this.state = 40;
					this.varDeclaration();
					}
					break;

				case 2:
					{
					this.state = 41;
					this.methodDeclaration();
					}
					break;

				case 3:
					{
					this.state = 42;
					this.structDeclaration();
					}
					break;

				case 4:
					{
					this.state = 43;
					this.classDefinition();
					}
					break;
				}
				}
				this.state = 48;
				this._errHandler.sync(this);
				_la = this._input.LA(1);
			}
			}
		}
		catch (re) {
			if (re instanceof RecognitionException) {
				_localctx.exception = re;
				this._errHandler.reportError(this, re);
				this._errHandler.recover(this, re);
			} else {
				throw re;
			}
		}
		finally {
			this.exitRule();
		}
		return _localctx;
	}
	// @RuleVersion(0)
	public varDeclaration(): VarDeclarationContext {
		let _localctx: VarDeclarationContext = new VarDeclarationContext(this._ctx, this.state);
		this.enterRule(_localctx, 2, CymbolParser.RULE_varDeclaration);
		let _la: number;
		try {
			this.enterOuterAlt(_localctx, 1);
			{
			this.state = 49;
			this.type();
			this.state = 50;
			this.match(CymbolParser.ID);
			this.state = 53;
			this._errHandler.sync(this);
			_la = this._input.LA(1);
			if (_la === CymbolParser.T__0) {
				{
				this.state = 51;
				this.match(CymbolParser.T__0);
				this.state = 52;
				this.expression();
				}
			}

			this.state = 55;
			this.match(CymbolParser.T__1);
			}
		}
		catch (re) {
			if (re instanceof RecognitionException) {
				_localctx.exception = re;
				this._errHandler.reportError(this, re);
				this._errHandler.recover(this, re);
			} else {
				throw re;
			}
		}
		finally {
			this.exitRule();
		}
		return _localctx;
	}
	// @RuleVersion(0)
	public methodDeclaration(): MethodDeclarationContext {
		let _localctx: MethodDeclarationContext = new MethodDeclarationContext(this._ctx, this.state);
		this.enterRule(_localctx, 4, CymbolParser.RULE_methodDeclaration);
		let _la: number;
		try {
			this.enterOuterAlt(_localctx, 1);
			{
			this.state = 57;
			this.type();
			this.state = 58;
			this.match(CymbolParser.ID);
			this.state = 59;
			this.match(CymbolParser.T__2);
			this.state = 61;
			this._errHandler.sync(this);
			_la = this._input.LA(1);
			if ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << CymbolParser.T__16) | (1 << CymbolParser.T__17) | (1 << CymbolParser.T__18) | (1 << CymbolParser.ID))) !== 0)) {
				{
				this.state = 60;
				this.formalParmeters();
				}
			}

			this.state = 63;
			this.match(CymbolParser.T__3);
			this.state = 64;
			this.block();
			}
		}
		catch (re) {
			if (re instanceof RecognitionException) {
				_localctx.exception = re;
				this._errHandler.reportError(this, re);
				this._errHandler.recover(this, re);
			} else {
				throw re;
			}
		}
		finally {
			this.exitRule();
		}
		return _localctx;
	}
	// @RuleVersion(0)
	public formalParmeters(): FormalParmetersContext {
		let _localctx: FormalParmetersContext = new FormalParmetersContext(this._ctx, this.state);
		this.enterRule(_localctx, 6, CymbolParser.RULE_formalParmeters);
		let _la: number;
		try {
			this.enterOuterAlt(_localctx, 1);
			{
			this.state = 66;
			this.type();
			this.state = 67;
			this.match(CymbolParser.ID);
			this.state = 74;
			this._errHandler.sync(this);
			_la = this._input.LA(1);
			while (_la === CymbolParser.T__4) {
				{
				{
				this.state = 68;
				this.match(CymbolParser.T__4);
				this.state = 69;
				this.type();
				this.state = 70;
				this.match(CymbolParser.ID);
				}
				}
				this.state = 76;
				this._errHandler.sync(this);
				_la = this._input.LA(1);
			}
			}
		}
		catch (re) {
			if (re instanceof RecognitionException) {
				_localctx.exception = re;
				this._errHandler.reportError(this, re);
				this._errHandler.recover(this, re);
			} else {
				throw re;
			}
		}
		finally {
			this.exitRule();
		}
		return _localctx;
	}
	// @RuleVersion(0)
	public block(): BlockContext {
		let _localctx: BlockContext = new BlockContext(this._ctx, this.state);
		this.enterRule(_localctx, 8, CymbolParser.RULE_block);
		let _la: number;
		try {
			this.enterOuterAlt(_localctx, 1);
			{
			this.state = 77;
			this.match(CymbolParser.T__5);
			this.state = 81;
			this._errHandler.sync(this);
			_la = this._input.LA(1);
			while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << CymbolParser.T__1) | (1 << CymbolParser.T__2) | (1 << CymbolParser.T__5) | (1 << CymbolParser.T__7) | (1 << CymbolParser.T__11) | (1 << CymbolParser.T__14) | (1 << CymbolParser.T__15) | (1 << CymbolParser.T__16) | (1 << CymbolParser.T__17) | (1 << CymbolParser.T__18) | (1 << CymbolParser.ID) | (1 << CymbolParser.INT))) !== 0)) {
				{
				{
				this.state = 78;
				this.statement();
				}
				}
				this.state = 83;
				this._errHandler.sync(this);
				_la = this._input.LA(1);
			}
			this.state = 84;
			this.match(CymbolParser.T__6);
			}
		}
		catch (re) {
			if (re instanceof RecognitionException) {
				_localctx.exception = re;
				this._errHandler.reportError(this, re);
				this._errHandler.recover(this, re);
			} else {
				throw re;
			}
		}
		finally {
			this.exitRule();
		}
		return _localctx;
	}
	// @RuleVersion(0)
	public structDeclaration(): StructDeclarationContext {
		let _localctx: StructDeclarationContext = new StructDeclarationContext(this._ctx, this.state);
		this.enterRule(_localctx, 10, CymbolParser.RULE_structDeclaration);
		let _la: number;
		try {
			this.enterOuterAlt(_localctx, 1);
			{
			this.state = 86;
			this.match(CymbolParser.T__7);
			this.state = 87;
			this.match(CymbolParser.ID);
			this.state = 88;
			this.match(CymbolParser.T__5);
			this.state = 90;
			this._errHandler.sync(this);
			_la = this._input.LA(1);
			do {
				{
				{
				this.state = 89;
				this.structMember();
				}
				}
				this.state = 92;
				this._errHandler.sync(this);
				_la = this._input.LA(1);
			} while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << CymbolParser.T__7) | (1 << CymbolParser.T__16) | (1 << CymbolParser.T__17) | (1 << CymbolParser.T__18) | (1 << CymbolParser.ID))) !== 0));
			this.state = 94;
			this.match(CymbolParser.T__6);
			this.state = 95;
			this.match(CymbolParser.T__1);
			}
		}
		catch (re) {
			if (re instanceof RecognitionException) {
				_localctx.exception = re;
				this._errHandler.reportError(this, re);
				this._errHandler.recover(this, re);
			} else {
				throw re;
			}
		}
		finally {
			this.exitRule();
		}
		return _localctx;
	}
	// @RuleVersion(0)
	public structMember(): StructMemberContext {
		let _localctx: StructMemberContext = new StructMemberContext(this._ctx, this.state);
		this.enterRule(_localctx, 12, CymbolParser.RULE_structMember);
		try {
			this.state = 102;
			this._errHandler.sync(this);
			switch (this._input.LA(1)) {
			case CymbolParser.T__16:
			case CymbolParser.T__17:
			case CymbolParser.T__18:
			case CymbolParser.ID:
				this.enterOuterAlt(_localctx, 1);
				{
				this.state = 97;
				this.type();
				this.state = 98;
				this.match(CymbolParser.ID);
				this.state = 99;
				this.match(CymbolParser.T__1);
				}
				break;
			case CymbolParser.T__7:
				this.enterOuterAlt(_localctx, 2);
				{
				this.state = 101;
				this.structDeclaration();
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (re) {
			if (re instanceof RecognitionException) {
				_localctx.exception = re;
				this._errHandler.reportError(this, re);
				this._errHandler.recover(this, re);
			} else {
				throw re;
			}
		}
		finally {
			this.exitRule();
		}
		return _localctx;
	}
	// @RuleVersion(0)
	public classDefinition(): ClassDefinitionContext {
		let _localctx: ClassDefinitionContext = new ClassDefinitionContext(this._ctx, this.state);
		this.enterRule(_localctx, 14, CymbolParser.RULE_classDefinition);
		let _la: number;
		try {
			this.enterOuterAlt(_localctx, 1);
			{
			this.state = 104;
			this.match(CymbolParser.T__8);
			this.state = 105;
			this.match(CymbolParser.ID);
			this.state = 107;
			this._errHandler.sync(this);
			_la = this._input.LA(1);
			if (_la === CymbolParser.T__9) {
				{
				this.state = 106;
				this.superClass();
				}
			}

			this.state = 109;
			this.match(CymbolParser.T__5);
			this.state = 111;
			this._errHandler.sync(this);
			_la = this._input.LA(1);
			do {
				{
				{
				this.state = 110;
				this.classMember();
				}
				}
				this.state = 113;
				this._errHandler.sync(this);
				_la = this._input.LA(1);
			} while ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << CymbolParser.T__10) | (1 << CymbolParser.T__16) | (1 << CymbolParser.T__17) | (1 << CymbolParser.T__18) | (1 << CymbolParser.ID))) !== 0));
			this.state = 115;
			this.match(CymbolParser.T__6);
			this.state = 116;
			this.match(CymbolParser.T__1);
			}
		}
		catch (re) {
			if (re instanceof RecognitionException) {
				_localctx.exception = re;
				this._errHandler.reportError(this, re);
				this._errHandler.recover(this, re);
			} else {
				throw re;
			}
		}
		finally {
			this.exitRule();
		}
		return _localctx;
	}
	// @RuleVersion(0)
	public superClass(): SuperClassContext {
		let _localctx: SuperClassContext = new SuperClassContext(this._ctx, this.state);
		this.enterRule(_localctx, 16, CymbolParser.RULE_superClass);
		try {
			this.enterOuterAlt(_localctx, 1);
			{
			this.state = 118;
			this.match(CymbolParser.T__9);
			this.state = 119;
			this.match(CymbolParser.T__10);
			this.state = 120;
			this.match(CymbolParser.ID);
			}
		}
		catch (re) {
			if (re instanceof RecognitionException) {
				_localctx.exception = re;
				this._errHandler.reportError(this, re);
				this._errHandler.recover(this, re);
			} else {
				throw re;
			}
		}
		finally {
			this.exitRule();
		}
		return _localctx;
	}
	// @RuleVersion(0)
	public classMember(): ClassMemberContext {
		let _localctx: ClassMemberContext = new ClassMemberContext(this._ctx, this.state);
		this.enterRule(_localctx, 18, CymbolParser.RULE_classMember);
		let _la: number;
		try {
			this.state = 133;
			this._errHandler.sync(this);
			switch ( this.interpreter.adaptivePredict(this._input, 11, this._ctx) ) {
			case 1:
				this.enterOuterAlt(_localctx, 1);
				{
				this.state = 122;
				this.type();
				this.state = 123;
				this.match(CymbolParser.ID);
				this.state = 126;
				this._errHandler.sync(this);
				_la = this._input.LA(1);
				if (_la === CymbolParser.T__0) {
					{
					this.state = 124;
					this.match(CymbolParser.T__0);
					this.state = 125;
					this.expression();
					}
				}

				this.state = 128;
				this.match(CymbolParser.T__1);
				}
				break;

			case 2:
				this.enterOuterAlt(_localctx, 2);
				{
				this.state = 130;
				this.methodDeclaration();
				}
				break;

			case 3:
				this.enterOuterAlt(_localctx, 3);
				{
				this.state = 131;
				this.match(CymbolParser.T__10);
				this.state = 132;
				this.match(CymbolParser.T__9);
				}
				break;
			}
		}
		catch (re) {
			if (re instanceof RecognitionException) {
				_localctx.exception = re;
				this._errHandler.reportError(this, re);
				this._errHandler.recover(this, re);
			} else {
				throw re;
			}
		}
		finally {
			this.exitRule();
		}
		return _localctx;
	}
	// @RuleVersion(0)
	public statement(): StatementContext {
		let _localctx: StatementContext = new StatementContext(this._ctx, this.state);
		this.enterRule(_localctx, 20, CymbolParser.RULE_statement);
		let _la: number;
		try {
			this.state = 152;
			this._errHandler.sync(this);
			switch ( this.interpreter.adaptivePredict(this._input, 14, this._ctx) ) {
			case 1:
				this.enterOuterAlt(_localctx, 1);
				{
				this.state = 135;
				this.block();
				}
				break;

			case 2:
				this.enterOuterAlt(_localctx, 2);
				{
				this.state = 136;
				this.varDeclaration();
				}
				break;

			case 3:
				this.enterOuterAlt(_localctx, 3);
				{
				this.state = 137;
				this.structDeclaration();
				}
				break;

			case 4:
				this.enterOuterAlt(_localctx, 4);
				{
				this.state = 138;
				this.match(CymbolParser.T__11);
				this.state = 140;
				this._errHandler.sync(this);
				_la = this._input.LA(1);
				if ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << CymbolParser.T__2) | (1 << CymbolParser.T__14) | (1 << CymbolParser.T__15) | (1 << CymbolParser.ID) | (1 << CymbolParser.INT))) !== 0)) {
					{
					this.state = 139;
					this.expression();
					}
				}

				this.state = 142;
				this.match(CymbolParser.T__1);
				}
				break;

			case 5:
				this.enterOuterAlt(_localctx, 5);
				{
				this.state = 143;
				this.postfixEpression();
				this.state = 147;
				this._errHandler.sync(this);
				switch (this._input.LA(1)) {
				case CymbolParser.T__0:
					{
					this.state = 144;
					this.match(CymbolParser.T__0);
					this.state = 145;
					this.expression();
					}
					break;
				case CymbolParser.T__1:
					// tslint:disable-next-line:no-empty
					{
					}
					break;
				default:
					throw new NoViableAltException(this);
				}
				this.state = 149;
				this.match(CymbolParser.T__1);
				}
				break;

			case 6:
				this.enterOuterAlt(_localctx, 6);
				{
				this.state = 151;
				this.match(CymbolParser.T__1);
				}
				break;
			}
		}
		catch (re) {
			if (re instanceof RecognitionException) {
				_localctx.exception = re;
				this._errHandler.reportError(this, re);
				this._errHandler.recover(this, re);
			} else {
				throw re;
			}
		}
		finally {
			this.exitRule();
		}
		return _localctx;
	}
	// @RuleVersion(0)
	public expressionList(): ExpressionListContext {
		let _localctx: ExpressionListContext = new ExpressionListContext(this._ctx, this.state);
		this.enterRule(_localctx, 22, CymbolParser.RULE_expressionList);
		let _la: number;
		try {
			this.state = 163;
			this._errHandler.sync(this);
			switch (this._input.LA(1)) {
			case CymbolParser.T__2:
			case CymbolParser.T__14:
			case CymbolParser.T__15:
			case CymbolParser.ID:
			case CymbolParser.INT:
				this.enterOuterAlt(_localctx, 1);
				{
				this.state = 154;
				this.expression();
				this.state = 159;
				this._errHandler.sync(this);
				_la = this._input.LA(1);
				while (_la === CymbolParser.T__4) {
					{
					{
					this.state = 155;
					this.match(CymbolParser.T__4);
					this.state = 156;
					this.expression();
					}
					}
					this.state = 161;
					this._errHandler.sync(this);
					_la = this._input.LA(1);
				}
				}
				break;
			case CymbolParser.T__3:
				this.enterOuterAlt(_localctx, 2);
				// tslint:disable-next-line:no-empty
				{
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (re) {
			if (re instanceof RecognitionException) {
				_localctx.exception = re;
				this._errHandler.reportError(this, re);
				this._errHandler.recover(this, re);
			} else {
				throw re;
			}
		}
		finally {
			this.exitRule();
		}
		return _localctx;
	}
	// @RuleVersion(0)
	public expression(): ExpressionContext {
		let _localctx: ExpressionContext = new ExpressionContext(this._ctx, this.state);
		this.enterRule(_localctx, 24, CymbolParser.RULE_expression);
		try {
			this.enterOuterAlt(_localctx, 1);
			{
			this.state = 165;
			this.addExpression();
			}
		}
		catch (re) {
			if (re instanceof RecognitionException) {
				_localctx.exception = re;
				this._errHandler.reportError(this, re);
				this._errHandler.recover(this, re);
			} else {
				throw re;
			}
		}
		finally {
			this.exitRule();
		}
		return _localctx;
	}
	// @RuleVersion(0)
	public addExpression(): AddExpressionContext {
		let _localctx: AddExpressionContext = new AddExpressionContext(this._ctx, this.state);
		this.enterRule(_localctx, 26, CymbolParser.RULE_addExpression);
		let _la: number;
		try {
			this.enterOuterAlt(_localctx, 1);
			{
			this.state = 167;
			this.postfixEpression();
			this.state = 172;
			this._errHandler.sync(this);
			_la = this._input.LA(1);
			while (_la === CymbolParser.T__12) {
				{
				{
				this.state = 168;
				this.match(CymbolParser.T__12);
				this.state = 169;
				this.postfixEpression();
				}
				}
				this.state = 174;
				this._errHandler.sync(this);
				_la = this._input.LA(1);
			}
			}
		}
		catch (re) {
			if (re instanceof RecognitionException) {
				_localctx.exception = re;
				this._errHandler.reportError(this, re);
				this._errHandler.recover(this, re);
			} else {
				throw re;
			}
		}
		finally {
			this.exitRule();
		}
		return _localctx;
	}
	// @RuleVersion(0)
	public postfixEpression(): PostfixEpressionContext {
		let _localctx: PostfixEpressionContext = new PostfixEpressionContext(this._ctx, this.state);
		this.enterRule(_localctx, 28, CymbolParser.RULE_postfixEpression);
		try {
			this.state = 178;
			this._errHandler.sync(this);
			switch ( this.interpreter.adaptivePredict(this._input, 18, this._ctx) ) {
			case 1:
				this.enterOuterAlt(_localctx, 1);
				{
				this.state = 175;
				this.functionCall();
				}
				break;

			case 2:
				this.enterOuterAlt(_localctx, 2);
				{
				this.state = 176;
				this.fieldsCall();
				}
				break;

			case 3:
				this.enterOuterAlt(_localctx, 3);
				{
				this.state = 177;
				this.methodCall();
				}
				break;
			}
		}
		catch (re) {
			if (re instanceof RecognitionException) {
				_localctx.exception = re;
				this._errHandler.reportError(this, re);
				this._errHandler.recover(this, re);
			} else {
				throw re;
			}
		}
		finally {
			this.exitRule();
		}
		return _localctx;
	}
	// @RuleVersion(0)
	public functionCall(): FunctionCallContext {
		let _localctx: FunctionCallContext = new FunctionCallContext(this._ctx, this.state);
		this.enterRule(_localctx, 30, CymbolParser.RULE_functionCall);
		let _la: number;
		try {
			this.enterOuterAlt(_localctx, 1);
			{
			this.state = 180;
			this.primary();
			this.state = 187;
			this._errHandler.sync(this);
			_la = this._input.LA(1);
			while (_la === CymbolParser.T__2) {
				{
				{
				this.state = 181;
				this.match(CymbolParser.T__2);
				this.state = 182;
				this.expressionList();
				this.state = 183;
				this.match(CymbolParser.T__3);
				}
				}
				this.state = 189;
				this._errHandler.sync(this);
				_la = this._input.LA(1);
			}
			}
		}
		catch (re) {
			if (re instanceof RecognitionException) {
				_localctx.exception = re;
				this._errHandler.reportError(this, re);
				this._errHandler.recover(this, re);
			} else {
				throw re;
			}
		}
		finally {
			this.exitRule();
		}
		return _localctx;
	}
	// @RuleVersion(0)
	public fieldsCall(): FieldsCallContext {
		let _localctx: FieldsCallContext = new FieldsCallContext(this._ctx, this.state);
		this.enterRule(_localctx, 32, CymbolParser.RULE_fieldsCall);
		let _la: number;
		try {
			this.enterOuterAlt(_localctx, 1);
			{
			this.state = 190;
			this.primary();
			this.state = 195;
			this._errHandler.sync(this);
			_la = this._input.LA(1);
			while (_la === CymbolParser.T__13) {
				{
				{
				this.state = 191;
				this.match(CymbolParser.T__13);
				this.state = 192;
				this.match(CymbolParser.ID);
				}
				}
				this.state = 197;
				this._errHandler.sync(this);
				_la = this._input.LA(1);
			}
			}
		}
		catch (re) {
			if (re instanceof RecognitionException) {
				_localctx.exception = re;
				this._errHandler.reportError(this, re);
				this._errHandler.recover(this, re);
			} else {
				throw re;
			}
		}
		finally {
			this.exitRule();
		}
		return _localctx;
	}
	// @RuleVersion(0)
	public methodCall(): MethodCallContext {
		let _localctx: MethodCallContext = new MethodCallContext(this._ctx, this.state);
		this.enterRule(_localctx, 34, CymbolParser.RULE_methodCall);
		let _la: number;
		try {
			this.enterOuterAlt(_localctx, 1);
			{
			this.state = 198;
			this.primary();
			this.state = 207;
			this._errHandler.sync(this);
			_la = this._input.LA(1);
			while (_la === CymbolParser.T__13) {
				{
				{
				this.state = 199;
				this.match(CymbolParser.T__13);
				this.state = 200;
				this.match(CymbolParser.ID);
				this.state = 201;
				this.match(CymbolParser.T__2);
				this.state = 202;
				this.expressionList();
				this.state = 203;
				this.match(CymbolParser.T__3);
				}
				}
				this.state = 209;
				this._errHandler.sync(this);
				_la = this._input.LA(1);
			}
			}
		}
		catch (re) {
			if (re instanceof RecognitionException) {
				_localctx.exception = re;
				this._errHandler.reportError(this, re);
				this._errHandler.recover(this, re);
			} else {
				throw re;
			}
		}
		finally {
			this.exitRule();
		}
		return _localctx;
	}
	// @RuleVersion(0)
	public primary(): PrimaryContext {
		let _localctx: PrimaryContext = new PrimaryContext(this._ctx, this.state);
		this.enterRule(_localctx, 36, CymbolParser.RULE_primary);
		try {
			this.state = 218;
			this._errHandler.sync(this);
			switch (this._input.LA(1)) {
			case CymbolParser.T__14:
				this.enterOuterAlt(_localctx, 1);
				{
				this.state = 210;
				this.match(CymbolParser.T__14);
				}
				break;
			case CymbolParser.T__15:
				this.enterOuterAlt(_localctx, 2);
				{
				this.state = 211;
				this.match(CymbolParser.T__15);
				}
				break;
			case CymbolParser.INT:
				this.enterOuterAlt(_localctx, 3);
				{
				this.state = 212;
				this.match(CymbolParser.INT);
				}
				break;
			case CymbolParser.ID:
				this.enterOuterAlt(_localctx, 4);
				{
				this.state = 213;
				this.match(CymbolParser.ID);
				}
				break;
			case CymbolParser.T__2:
				this.enterOuterAlt(_localctx, 5);
				{
				this.state = 214;
				this.match(CymbolParser.T__2);
				this.state = 215;
				this.expression();
				this.state = 216;
				this.match(CymbolParser.T__3);
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (re) {
			if (re instanceof RecognitionException) {
				_localctx.exception = re;
				this._errHandler.reportError(this, re);
				this._errHandler.recover(this, re);
			} else {
				throw re;
			}
		}
		finally {
			this.exitRule();
		}
		return _localctx;
	}
	// @RuleVersion(0)
	public type(): TypeContext {
		let _localctx: TypeContext = new TypeContext(this._ctx, this.state);
		this.enterRule(_localctx, 38, CymbolParser.RULE_type);
		let _la: number;
		try {
			this.enterOuterAlt(_localctx, 1);
			{
			this.state = 220;
			_la = this._input.LA(1);
			if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << CymbolParser.T__16) | (1 << CymbolParser.T__17) | (1 << CymbolParser.T__18) | (1 << CymbolParser.ID))) !== 0))) {
			this._errHandler.recoverInline(this);
			} else {
				if (this._input.LA(1) === Token.EOF) {
					this.matchedEOF = true;
				}

				this._errHandler.reportMatch(this);
				this.consume();
			}
			}
		}
		catch (re) {
			if (re instanceof RecognitionException) {
				_localctx.exception = re;
				this._errHandler.reportError(this, re);
				this._errHandler.recover(this, re);
			} else {
				throw re;
			}
		}
		finally {
			this.exitRule();
		}
		return _localctx;
	}

	public static readonly _serializedATN: string =
		"\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x03\x19\xE1\x04\x02" +
		"\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06\x04\x07" +
		"\t\x07\x04\b\t\b\x04\t\t\t\x04\n\t\n\x04\v\t\v\x04\f\t\f\x04\r\t\r\x04" +
		"\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11\x04\x12\t\x12\x04" +
		"\x13\t\x13\x04\x14\t\x14\x04\x15\t\x15\x03\x02\x03\x02\x03\x02\x03\x02" +
		"\x07\x02/\n\x02\f\x02\x0E\x022\v\x02\x03\x03\x03\x03\x03\x03\x03\x03\x05" +
		"\x038\n\x03\x03\x03\x03\x03\x03\x04\x03\x04\x03\x04\x03\x04\x05\x04@\n" +
		"\x04\x03\x04\x03\x04\x03\x04\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03" +
		"\x05\x07\x05K\n\x05\f\x05\x0E\x05N\v\x05\x03\x06\x03\x06\x07\x06R\n\x06" +
		"\f\x06\x0E\x06U\v\x06\x03\x06\x03\x06\x03\x07\x03\x07\x03\x07\x03\x07" +
		"\x06\x07]\n\x07\r\x07\x0E\x07^\x03\x07\x03\x07\x03\x07\x03\b\x03\b\x03" +
		"\b\x03\b\x03\b\x05\bi\n\b\x03\t\x03\t\x03\t\x05\tn\n\t\x03\t\x03\t\x06" +
		"\tr\n\t\r\t\x0E\ts\x03\t\x03\t\x03\t\x03\n\x03\n\x03\n\x03\n\x03\v\x03" +
		"\v\x03\v\x03\v\x05\v\x81\n\v\x03\v\x03\v\x03\v\x03\v\x03\v\x05\v\x88\n" +
		"\v\x03\f\x03\f\x03\f\x03\f\x03\f\x05\f\x8F\n\f\x03\f\x03\f\x03\f\x03\f" +
		"\x03\f\x05\f\x96\n\f\x03\f\x03\f\x03\f\x05\f\x9B\n\f\x03\r\x03\r\x03\r" +
		"\x07\r\xA0\n\r\f\r\x0E\r\xA3\v\r\x03\r\x05\r\xA6\n\r\x03\x0E\x03\x0E\x03" +
		"\x0F\x03\x0F\x03\x0F\x07\x0F\xAD\n\x0F\f\x0F\x0E\x0F\xB0\v\x0F\x03\x10" +
		"\x03\x10\x03\x10\x05\x10\xB5\n\x10\x03\x11\x03\x11\x03\x11\x03\x11\x03" +
		"\x11\x07\x11\xBC\n\x11\f\x11\x0E\x11\xBF\v\x11\x03\x12\x03\x12\x03\x12" +
		"\x07\x12\xC4\n\x12\f\x12\x0E\x12\xC7\v\x12\x03\x13\x03\x13\x03\x13\x03" +
		"\x13\x03\x13\x03\x13\x03\x13\x07\x13\xD0\n\x13\f\x13\x0E\x13\xD3\v\x13" +
		"\x03\x14\x03\x14\x03\x14\x03\x14\x03\x14\x03\x14\x03\x14\x03\x14\x05\x14" +
		"\xDD\n\x14\x03\x15\x03\x15\x03\x15\x02\x02\x02\x16\x02\x02\x04\x02\x06" +
		"\x02\b\x02\n\x02\f\x02\x0E\x02\x10\x02\x12\x02\x14\x02\x16\x02\x18\x02" +
		"\x1A\x02\x1C\x02\x1E\x02 \x02\"\x02$\x02&\x02(\x02\x02\x03\x03\x02\x13" +
		"\x16\x02\xEE\x020\x03\x02\x02\x02\x043\x03\x02\x02\x02\x06;\x03\x02\x02" +
		"\x02\bD\x03\x02\x02\x02\nO\x03\x02\x02\x02\fX\x03\x02\x02\x02\x0Eh\x03" +
		"\x02\x02\x02\x10j\x03\x02\x02\x02\x12x\x03\x02\x02\x02\x14\x87\x03\x02" +
		"\x02\x02\x16\x9A\x03\x02\x02\x02\x18\xA5\x03\x02\x02\x02\x1A\xA7\x03\x02" +
		"\x02\x02\x1C\xA9\x03\x02\x02\x02\x1E\xB4\x03\x02\x02\x02 \xB6\x03\x02" +
		"\x02\x02\"\xC0\x03\x02\x02\x02$\xC8\x03\x02\x02\x02&\xDC\x03\x02\x02\x02" +
		"(\xDE\x03\x02\x02\x02*/\x05\x04\x03\x02+/\x05\x06\x04\x02,/\x05\f\x07" +
		"\x02-/\x05\x10\t\x02.*\x03\x02\x02\x02.+\x03\x02\x02\x02.,\x03\x02\x02" +
		"\x02.-\x03\x02\x02\x02/2\x03\x02\x02\x020.\x03\x02\x02\x0201\x03\x02\x02" +
		"\x021\x03\x03\x02\x02\x0220\x03\x02\x02\x0234\x05(\x15\x0247\x07\x16\x02" +
		"\x0256\x07\x03\x02\x0268\x05\x1A\x0E\x0275\x03\x02\x02\x0278\x03\x02\x02" +
		"\x0289\x03\x02\x02\x029:\x07\x04\x02\x02:\x05\x03\x02\x02\x02;<\x05(\x15" +
		"\x02<=\x07\x16\x02\x02=?\x07\x05\x02\x02>@\x05\b\x05\x02?>\x03\x02\x02" +
		"\x02?@\x03\x02\x02\x02@A\x03\x02\x02\x02AB\x07\x06\x02\x02BC\x05\n\x06" +
		"\x02C\x07\x03\x02\x02\x02DE\x05(\x15\x02EL\x07\x16\x02\x02FG\x07\x07\x02" +
		"\x02GH\x05(\x15\x02HI\x07\x16\x02\x02IK\x03\x02\x02\x02JF\x03\x02\x02" +
		"\x02KN\x03\x02\x02\x02LJ\x03\x02\x02\x02LM\x03\x02\x02\x02M\t\x03\x02" +
		"\x02\x02NL\x03\x02\x02\x02OS\x07\b\x02\x02PR\x05\x16\f\x02QP\x03\x02\x02" +
		"\x02RU\x03\x02\x02\x02SQ\x03\x02\x02\x02ST\x03\x02\x02\x02TV\x03\x02\x02" +
		"\x02US\x03\x02\x02\x02VW\x07\t\x02\x02W\v\x03\x02\x02\x02XY\x07\n\x02" +
		"\x02YZ\x07\x16\x02\x02Z\\\x07\b\x02\x02[]\x05\x0E\b\x02\\[\x03\x02\x02" +
		"\x02]^\x03\x02\x02\x02^\\\x03\x02\x02\x02^_\x03\x02\x02\x02_`\x03\x02" +
		"\x02\x02`a\x07\t\x02\x02ab\x07\x04\x02\x02b\r\x03\x02\x02\x02cd\x05(\x15" +
		"\x02de\x07\x16\x02\x02ef\x07\x04\x02\x02fi\x03\x02\x02\x02gi\x05\f\x07" +
		"\x02hc\x03\x02\x02\x02hg\x03\x02\x02\x02i\x0F\x03\x02\x02\x02jk\x07\v" +
		"\x02\x02km\x07\x16\x02\x02ln\x05\x12\n\x02ml\x03\x02\x02\x02mn\x03\x02" +
		"\x02\x02no\x03\x02\x02\x02oq\x07\b\x02\x02pr\x05\x14\v\x02qp\x03\x02\x02" +
		"\x02rs\x03\x02\x02\x02sq\x03\x02\x02\x02st\x03\x02\x02\x02tu\x03\x02\x02" +
		"\x02uv\x07\t\x02\x02vw\x07\x04\x02\x02w\x11\x03\x02\x02\x02xy\x07\f\x02" +
		"\x02yz\x07\r\x02\x02z{\x07\x16\x02\x02{\x13\x03\x02\x02\x02|}\x05(\x15" +
		"\x02}\x80\x07\x16\x02\x02~\x7F\x07\x03\x02\x02\x7F\x81\x05\x1A\x0E\x02" +
		"\x80~\x03\x02\x02\x02\x80\x81\x03\x02\x02\x02\x81\x82\x03\x02\x02\x02" +
		"\x82\x83\x07\x04\x02\x02\x83\x88\x03\x02\x02\x02\x84\x88\x05\x06\x04\x02" +
		"\x85\x86\x07\r\x02\x02\x86\x88\x07\f\x02\x02\x87|\x03\x02\x02\x02\x87" +
		"\x84\x03\x02\x02\x02\x87\x85\x03\x02\x02\x02\x88\x15\x03\x02\x02\x02\x89" +
		"\x9B\x05\n\x06\x02\x8A\x9B\x05\x04\x03\x02\x8B\x9B\x05\f\x07\x02\x8C\x8E" +
		"\x07\x0E\x02\x02\x8D\x8F\x05\x1A\x0E\x02\x8E\x8D\x03\x02\x02\x02\x8E\x8F" +
		"\x03\x02\x02\x02\x8F\x90\x03\x02\x02\x02\x90\x9B\x07\x04\x02\x02\x91\x95" +
		"\x05\x1E\x10\x02\x92\x93\x07\x03\x02\x02\x93\x96\x05\x1A\x0E\x02\x94\x96" +
		"\x03\x02\x02\x02\x95\x92\x03\x02\x02\x02\x95\x94\x03\x02\x02\x02\x96\x97" +
		"\x03\x02\x02\x02\x97\x98\x07\x04\x02\x02\x98\x9B\x03\x02\x02\x02\x99\x9B" +
		"\x07\x04\x02\x02\x9A\x89\x03\x02\x02\x02\x9A\x8A\x03\x02\x02\x02\x9A\x8B" +
		"\x03\x02\x02\x02\x9A\x8C\x03\x02\x02\x02\x9A\x91\x03\x02\x02\x02\x9A\x99" +
		"\x03\x02\x02\x02\x9B\x17\x03\x02\x02\x02\x9C\xA1\x05\x1A\x0E\x02\x9D\x9E" +
		"\x07\x07\x02\x02\x9E\xA0\x05\x1A\x0E\x02\x9F\x9D\x03\x02\x02\x02\xA0\xA3" +
		"\x03\x02\x02\x02\xA1\x9F\x03\x02\x02\x02\xA1\xA2\x03\x02\x02\x02\xA2\xA6" +
		"\x03\x02\x02\x02\xA3\xA1\x03\x02\x02\x02\xA4\xA6\x03\x02\x02\x02\xA5\x9C" +
		"\x03\x02\x02\x02\xA5\xA4\x03\x02\x02\x02\xA6\x19\x03\x02\x02\x02\xA7\xA8" +
		"\x05\x1C\x0F\x02\xA8\x1B\x03\x02\x02\x02\xA9\xAE\x05\x1E\x10\x02\xAA\xAB" +
		"\x07\x0F\x02\x02\xAB\xAD\x05\x1E\x10\x02\xAC\xAA\x03\x02\x02\x02\xAD\xB0" +
		"\x03\x02\x02\x02\xAE\xAC\x03\x02\x02\x02\xAE\xAF\x03\x02\x02\x02\xAF\x1D" +
		"\x03\x02\x02\x02\xB0\xAE\x03\x02\x02\x02\xB1\xB5\x05 \x11\x02\xB2\xB5" +
		"\x05\"\x12\x02\xB3\xB5\x05$\x13\x02\xB4\xB1\x03\x02\x02\x02\xB4\xB2\x03" +
		"\x02\x02\x02\xB4\xB3\x03\x02\x02\x02\xB5\x1F\x03\x02\x02\x02\xB6\xBD\x05" +
		"&\x14\x02\xB7\xB8\x07\x05\x02\x02\xB8\xB9\x05\x18\r\x02\xB9\xBA\x07\x06" +
		"\x02\x02\xBA\xBC\x03\x02\x02\x02\xBB\xB7\x03\x02\x02\x02\xBC\xBF\x03\x02" +
		"\x02\x02\xBD\xBB\x03\x02\x02\x02\xBD\xBE\x03\x02\x02\x02\xBE!\x03\x02" +
		"\x02\x02\xBF\xBD\x03\x02\x02\x02\xC0\xC5\x05&\x14\x02\xC1\xC2\x07\x10" +
		"\x02\x02\xC2\xC4\x07\x16\x02\x02\xC3\xC1\x03\x02\x02\x02\xC4\xC7\x03\x02" +
		"\x02\x02\xC5\xC3\x03\x02\x02\x02\xC5\xC6\x03\x02\x02\x02\xC6#\x03\x02" +
		"\x02\x02\xC7\xC5\x03\x02\x02\x02\xC8\xD1\x05&\x14\x02\xC9\xCA\x07\x10" +
		"\x02\x02\xCA\xCB\x07\x16\x02\x02\xCB\xCC\x07\x05\x02\x02\xCC\xCD\x05\x18" +
		"\r\x02\xCD\xCE\x07\x06\x02\x02\xCE\xD0\x03\x02\x02\x02\xCF\xC9\x03\x02" +
		"\x02\x02\xD0\xD3\x03\x02\x02\x02\xD1\xCF\x03\x02\x02\x02\xD1\xD2\x03\x02" +
		"\x02\x02\xD2%\x03\x02\x02\x02\xD3\xD1\x03\x02\x02\x02\xD4\xDD\x07\x11" +
		"\x02\x02\xD5\xDD\x07\x12\x02\x02\xD6\xDD\x07\x17\x02\x02\xD7\xDD\x07\x16" +
		"\x02\x02\xD8\xD9\x07\x05\x02\x02\xD9\xDA\x05\x1A\x0E\x02\xDA\xDB\x07\x06" +
		"\x02\x02\xDB\xDD\x03\x02\x02\x02\xDC\xD4\x03\x02\x02\x02\xDC\xD5\x03\x02" +
		"\x02\x02\xDC\xD6\x03\x02\x02\x02\xDC\xD7\x03\x02\x02\x02\xDC\xD8\x03\x02" +
		"\x02\x02\xDD\'\x03\x02\x02\x02\xDE\xDF\t\x02\x02\x02\xDF)\x03\x02\x02" +
		"\x02\x19.07?LS^hms\x80\x87\x8E\x95\x9A\xA1\xA5\xAE\xB4\xBD\xC5\xD1\xDC";
	public static __ATN: ATN;
	public static get _ATN(): ATN {
		if (!CymbolParser.__ATN) {
			CymbolParser.__ATN = new ATNDeserializer().deserialize(Utils.toCharArray(CymbolParser._serializedATN));
		}

		return CymbolParser.__ATN;
	}

}

export class CompilationUnitContext extends ParserRuleContext {
	public varDeclaration(): VarDeclarationContext[];
	public varDeclaration(i: number): VarDeclarationContext;
	public varDeclaration(i?: number): VarDeclarationContext | VarDeclarationContext[] {
		if (i === undefined) {
			return this.getRuleContexts(VarDeclarationContext);
		} else {
			return this.getRuleContext(i, VarDeclarationContext);
		}
	}
	public methodDeclaration(): MethodDeclarationContext[];
	public methodDeclaration(i: number): MethodDeclarationContext;
	public methodDeclaration(i?: number): MethodDeclarationContext | MethodDeclarationContext[] {
		if (i === undefined) {
			return this.getRuleContexts(MethodDeclarationContext);
		} else {
			return this.getRuleContext(i, MethodDeclarationContext);
		}
	}
	public structDeclaration(): StructDeclarationContext[];
	public structDeclaration(i: number): StructDeclarationContext;
	public structDeclaration(i?: number): StructDeclarationContext | StructDeclarationContext[] {
		if (i === undefined) {
			return this.getRuleContexts(StructDeclarationContext);
		} else {
			return this.getRuleContext(i, StructDeclarationContext);
		}
	}
	public classDefinition(): ClassDefinitionContext[];
	public classDefinition(i: number): ClassDefinitionContext;
	public classDefinition(i?: number): ClassDefinitionContext | ClassDefinitionContext[] {
		if (i === undefined) {
			return this.getRuleContexts(ClassDefinitionContext);
		} else {
			return this.getRuleContext(i, ClassDefinitionContext);
		}
	}
	constructor(parent: ParserRuleContext | undefined, invokingState: number) {
		super(parent, invokingState);
	}
	// @Override
	public get ruleIndex(): number { return CymbolParser.RULE_compilationUnit; }
	// @Override
	public enterRule(listener: CymbolListener): void {
		if (listener.enterCompilationUnit) {
			listener.enterCompilationUnit(this);
		}
	}
	// @Override
	public exitRule(listener: CymbolListener): void {
		if (listener.exitCompilationUnit) {
			listener.exitCompilationUnit(this);
		}
	}
	// @Override
	public accept<Result>(visitor: CymbolVisitor<Result>): Result {
		if (visitor.visitCompilationUnit) {
			return visitor.visitCompilationUnit(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class VarDeclarationContext extends ParserRuleContext {
	public type(): TypeContext {
		return this.getRuleContext(0, TypeContext);
	}
	public ID(): TerminalNode { return this.getToken(CymbolParser.ID, 0); }
	public expression(): ExpressionContext | undefined {
		return this.tryGetRuleContext(0, ExpressionContext);
	}
	constructor(parent: ParserRuleContext | undefined, invokingState: number) {
		super(parent, invokingState);
	}
	// @Override
	public get ruleIndex(): number { return CymbolParser.RULE_varDeclaration; }
	// @Override
	public enterRule(listener: CymbolListener): void {
		if (listener.enterVarDeclaration) {
			listener.enterVarDeclaration(this);
		}
	}
	// @Override
	public exitRule(listener: CymbolListener): void {
		if (listener.exitVarDeclaration) {
			listener.exitVarDeclaration(this);
		}
	}
	// @Override
	public accept<Result>(visitor: CymbolVisitor<Result>): Result {
		if (visitor.visitVarDeclaration) {
			return visitor.visitVarDeclaration(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class MethodDeclarationContext extends ParserRuleContext {
	public type(): TypeContext {
		return this.getRuleContext(0, TypeContext);
	}
	public ID(): TerminalNode { return this.getToken(CymbolParser.ID, 0); }
	public block(): BlockContext {
		return this.getRuleContext(0, BlockContext);
	}
	public formalParmeters(): FormalParmetersContext | undefined {
		return this.tryGetRuleContext(0, FormalParmetersContext);
	}
	constructor(parent: ParserRuleContext | undefined, invokingState: number) {
		super(parent, invokingState);
	}
	// @Override
	public get ruleIndex(): number { return CymbolParser.RULE_methodDeclaration; }
	// @Override
	public enterRule(listener: CymbolListener): void {
		if (listener.enterMethodDeclaration) {
			listener.enterMethodDeclaration(this);
		}
	}
	// @Override
	public exitRule(listener: CymbolListener): void {
		if (listener.exitMethodDeclaration) {
			listener.exitMethodDeclaration(this);
		}
	}
	// @Override
	public accept<Result>(visitor: CymbolVisitor<Result>): Result {
		if (visitor.visitMethodDeclaration) {
			return visitor.visitMethodDeclaration(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class FormalParmetersContext extends ParserRuleContext {
	public type(): TypeContext[];
	public type(i: number): TypeContext;
	public type(i?: number): TypeContext | TypeContext[] {
		if (i === undefined) {
			return this.getRuleContexts(TypeContext);
		} else {
			return this.getRuleContext(i, TypeContext);
		}
	}
	public ID(): TerminalNode[];
	public ID(i: number): TerminalNode;
	public ID(i?: number): TerminalNode | TerminalNode[] {
		if (i === undefined) {
			return this.getTokens(CymbolParser.ID);
		} else {
			return this.getToken(CymbolParser.ID, i);
		}
	}
	constructor(parent: ParserRuleContext | undefined, invokingState: number) {
		super(parent, invokingState);
	}
	// @Override
	public get ruleIndex(): number { return CymbolParser.RULE_formalParmeters; }
	// @Override
	public enterRule(listener: CymbolListener): void {
		if (listener.enterFormalParmeters) {
			listener.enterFormalParmeters(this);
		}
	}
	// @Override
	public exitRule(listener: CymbolListener): void {
		if (listener.exitFormalParmeters) {
			listener.exitFormalParmeters(this);
		}
	}
	// @Override
	public accept<Result>(visitor: CymbolVisitor<Result>): Result {
		if (visitor.visitFormalParmeters) {
			return visitor.visitFormalParmeters(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class BlockContext extends ParserRuleContext {
	public statement(): StatementContext[];
	public statement(i: number): StatementContext;
	public statement(i?: number): StatementContext | StatementContext[] {
		if (i === undefined) {
			return this.getRuleContexts(StatementContext);
		} else {
			return this.getRuleContext(i, StatementContext);
		}
	}
	constructor(parent: ParserRuleContext | undefined, invokingState: number) {
		super(parent, invokingState);
	}
	// @Override
	public get ruleIndex(): number { return CymbolParser.RULE_block; }
	// @Override
	public enterRule(listener: CymbolListener): void {
		if (listener.enterBlock) {
			listener.enterBlock(this);
		}
	}
	// @Override
	public exitRule(listener: CymbolListener): void {
		if (listener.exitBlock) {
			listener.exitBlock(this);
		}
	}
	// @Override
	public accept<Result>(visitor: CymbolVisitor<Result>): Result {
		if (visitor.visitBlock) {
			return visitor.visitBlock(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class StructDeclarationContext extends ParserRuleContext {
	public ID(): TerminalNode { return this.getToken(CymbolParser.ID, 0); }
	public structMember(): StructMemberContext[];
	public structMember(i: number): StructMemberContext;
	public structMember(i?: number): StructMemberContext | StructMemberContext[] {
		if (i === undefined) {
			return this.getRuleContexts(StructMemberContext);
		} else {
			return this.getRuleContext(i, StructMemberContext);
		}
	}
	constructor(parent: ParserRuleContext | undefined, invokingState: number) {
		super(parent, invokingState);
	}
	// @Override
	public get ruleIndex(): number { return CymbolParser.RULE_structDeclaration; }
	// @Override
	public enterRule(listener: CymbolListener): void {
		if (listener.enterStructDeclaration) {
			listener.enterStructDeclaration(this);
		}
	}
	// @Override
	public exitRule(listener: CymbolListener): void {
		if (listener.exitStructDeclaration) {
			listener.exitStructDeclaration(this);
		}
	}
	// @Override
	public accept<Result>(visitor: CymbolVisitor<Result>): Result {
		if (visitor.visitStructDeclaration) {
			return visitor.visitStructDeclaration(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class StructMemberContext extends ParserRuleContext {
	public type(): TypeContext | undefined {
		return this.tryGetRuleContext(0, TypeContext);
	}
	public ID(): TerminalNode | undefined { return this.tryGetToken(CymbolParser.ID, 0); }
	public structDeclaration(): StructDeclarationContext | undefined {
		return this.tryGetRuleContext(0, StructDeclarationContext);
	}
	constructor(parent: ParserRuleContext | undefined, invokingState: number) {
		super(parent, invokingState);
	}
	// @Override
	public get ruleIndex(): number { return CymbolParser.RULE_structMember; }
	// @Override
	public enterRule(listener: CymbolListener): void {
		if (listener.enterStructMember) {
			listener.enterStructMember(this);
		}
	}
	// @Override
	public exitRule(listener: CymbolListener): void {
		if (listener.exitStructMember) {
			listener.exitStructMember(this);
		}
	}
	// @Override
	public accept<Result>(visitor: CymbolVisitor<Result>): Result {
		if (visitor.visitStructMember) {
			return visitor.visitStructMember(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class ClassDefinitionContext extends ParserRuleContext {
	public ID(): TerminalNode { return this.getToken(CymbolParser.ID, 0); }
	public superClass(): SuperClassContext | undefined {
		return this.tryGetRuleContext(0, SuperClassContext);
	}
	public classMember(): ClassMemberContext[];
	public classMember(i: number): ClassMemberContext;
	public classMember(i?: number): ClassMemberContext | ClassMemberContext[] {
		if (i === undefined) {
			return this.getRuleContexts(ClassMemberContext);
		} else {
			return this.getRuleContext(i, ClassMemberContext);
		}
	}
	constructor(parent: ParserRuleContext | undefined, invokingState: number) {
		super(parent, invokingState);
	}
	// @Override
	public get ruleIndex(): number { return CymbolParser.RULE_classDefinition; }
	// @Override
	public enterRule(listener: CymbolListener): void {
		if (listener.enterClassDefinition) {
			listener.enterClassDefinition(this);
		}
	}
	// @Override
	public exitRule(listener: CymbolListener): void {
		if (listener.exitClassDefinition) {
			listener.exitClassDefinition(this);
		}
	}
	// @Override
	public accept<Result>(visitor: CymbolVisitor<Result>): Result {
		if (visitor.visitClassDefinition) {
			return visitor.visitClassDefinition(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class SuperClassContext extends ParserRuleContext {
	public ID(): TerminalNode { return this.getToken(CymbolParser.ID, 0); }
	constructor(parent: ParserRuleContext | undefined, invokingState: number) {
		super(parent, invokingState);
	}
	// @Override
	public get ruleIndex(): number { return CymbolParser.RULE_superClass; }
	// @Override
	public enterRule(listener: CymbolListener): void {
		if (listener.enterSuperClass) {
			listener.enterSuperClass(this);
		}
	}
	// @Override
	public exitRule(listener: CymbolListener): void {
		if (listener.exitSuperClass) {
			listener.exitSuperClass(this);
		}
	}
	// @Override
	public accept<Result>(visitor: CymbolVisitor<Result>): Result {
		if (visitor.visitSuperClass) {
			return visitor.visitSuperClass(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class ClassMemberContext extends ParserRuleContext {
	public type(): TypeContext | undefined {
		return this.tryGetRuleContext(0, TypeContext);
	}
	public ID(): TerminalNode | undefined { return this.tryGetToken(CymbolParser.ID, 0); }
	public expression(): ExpressionContext | undefined {
		return this.tryGetRuleContext(0, ExpressionContext);
	}
	public methodDeclaration(): MethodDeclarationContext | undefined {
		return this.tryGetRuleContext(0, MethodDeclarationContext);
	}
	constructor(parent: ParserRuleContext | undefined, invokingState: number) {
		super(parent, invokingState);
	}
	// @Override
	public get ruleIndex(): number { return CymbolParser.RULE_classMember; }
	// @Override
	public enterRule(listener: CymbolListener): void {
		if (listener.enterClassMember) {
			listener.enterClassMember(this);
		}
	}
	// @Override
	public exitRule(listener: CymbolListener): void {
		if (listener.exitClassMember) {
			listener.exitClassMember(this);
		}
	}
	// @Override
	public accept<Result>(visitor: CymbolVisitor<Result>): Result {
		if (visitor.visitClassMember) {
			return visitor.visitClassMember(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class StatementContext extends ParserRuleContext {
	public block(): BlockContext | undefined {
		return this.tryGetRuleContext(0, BlockContext);
	}
	public varDeclaration(): VarDeclarationContext | undefined {
		return this.tryGetRuleContext(0, VarDeclarationContext);
	}
	public structDeclaration(): StructDeclarationContext | undefined {
		return this.tryGetRuleContext(0, StructDeclarationContext);
	}
	public expression(): ExpressionContext | undefined {
		return this.tryGetRuleContext(0, ExpressionContext);
	}
	public postfixEpression(): PostfixEpressionContext | undefined {
		return this.tryGetRuleContext(0, PostfixEpressionContext);
	}
	constructor(parent: ParserRuleContext | undefined, invokingState: number) {
		super(parent, invokingState);
	}
	// @Override
	public get ruleIndex(): number { return CymbolParser.RULE_statement; }
	// @Override
	public enterRule(listener: CymbolListener): void {
		if (listener.enterStatement) {
			listener.enterStatement(this);
		}
	}
	// @Override
	public exitRule(listener: CymbolListener): void {
		if (listener.exitStatement) {
			listener.exitStatement(this);
		}
	}
	// @Override
	public accept<Result>(visitor: CymbolVisitor<Result>): Result {
		if (visitor.visitStatement) {
			return visitor.visitStatement(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class ExpressionListContext extends ParserRuleContext {
	public expression(): ExpressionContext[];
	public expression(i: number): ExpressionContext;
	public expression(i?: number): ExpressionContext | ExpressionContext[] {
		if (i === undefined) {
			return this.getRuleContexts(ExpressionContext);
		} else {
			return this.getRuleContext(i, ExpressionContext);
		}
	}
	constructor(parent: ParserRuleContext | undefined, invokingState: number) {
		super(parent, invokingState);
	}
	// @Override
	public get ruleIndex(): number { return CymbolParser.RULE_expressionList; }
	// @Override
	public enterRule(listener: CymbolListener): void {
		if (listener.enterExpressionList) {
			listener.enterExpressionList(this);
		}
	}
	// @Override
	public exitRule(listener: CymbolListener): void {
		if (listener.exitExpressionList) {
			listener.exitExpressionList(this);
		}
	}
	// @Override
	public accept<Result>(visitor: CymbolVisitor<Result>): Result {
		if (visitor.visitExpressionList) {
			return visitor.visitExpressionList(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class ExpressionContext extends ParserRuleContext {
	public addExpression(): AddExpressionContext {
		return this.getRuleContext(0, AddExpressionContext);
	}
	constructor(parent: ParserRuleContext | undefined, invokingState: number) {
		super(parent, invokingState);
	}
	// @Override
	public get ruleIndex(): number { return CymbolParser.RULE_expression; }
	// @Override
	public enterRule(listener: CymbolListener): void {
		if (listener.enterExpression) {
			listener.enterExpression(this);
		}
	}
	// @Override
	public exitRule(listener: CymbolListener): void {
		if (listener.exitExpression) {
			listener.exitExpression(this);
		}
	}
	// @Override
	public accept<Result>(visitor: CymbolVisitor<Result>): Result {
		if (visitor.visitExpression) {
			return visitor.visitExpression(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class AddExpressionContext extends ParserRuleContext {
	public postfixEpression(): PostfixEpressionContext[];
	public postfixEpression(i: number): PostfixEpressionContext;
	public postfixEpression(i?: number): PostfixEpressionContext | PostfixEpressionContext[] {
		if (i === undefined) {
			return this.getRuleContexts(PostfixEpressionContext);
		} else {
			return this.getRuleContext(i, PostfixEpressionContext);
		}
	}
	constructor(parent: ParserRuleContext | undefined, invokingState: number) {
		super(parent, invokingState);
	}
	// @Override
	public get ruleIndex(): number { return CymbolParser.RULE_addExpression; }
	// @Override
	public enterRule(listener: CymbolListener): void {
		if (listener.enterAddExpression) {
			listener.enterAddExpression(this);
		}
	}
	// @Override
	public exitRule(listener: CymbolListener): void {
		if (listener.exitAddExpression) {
			listener.exitAddExpression(this);
		}
	}
	// @Override
	public accept<Result>(visitor: CymbolVisitor<Result>): Result {
		if (visitor.visitAddExpression) {
			return visitor.visitAddExpression(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class PostfixEpressionContext extends ParserRuleContext {
	public functionCall(): FunctionCallContext | undefined {
		return this.tryGetRuleContext(0, FunctionCallContext);
	}
	public fieldsCall(): FieldsCallContext | undefined {
		return this.tryGetRuleContext(0, FieldsCallContext);
	}
	public methodCall(): MethodCallContext | undefined {
		return this.tryGetRuleContext(0, MethodCallContext);
	}
	constructor(parent: ParserRuleContext | undefined, invokingState: number) {
		super(parent, invokingState);
	}
	// @Override
	public get ruleIndex(): number { return CymbolParser.RULE_postfixEpression; }
	// @Override
	public enterRule(listener: CymbolListener): void {
		if (listener.enterPostfixEpression) {
			listener.enterPostfixEpression(this);
		}
	}
	// @Override
	public exitRule(listener: CymbolListener): void {
		if (listener.exitPostfixEpression) {
			listener.exitPostfixEpression(this);
		}
	}
	// @Override
	public accept<Result>(visitor: CymbolVisitor<Result>): Result {
		if (visitor.visitPostfixEpression) {
			return visitor.visitPostfixEpression(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class FunctionCallContext extends ParserRuleContext {
	public primary(): PrimaryContext {
		return this.getRuleContext(0, PrimaryContext);
	}
	public expressionList(): ExpressionListContext[];
	public expressionList(i: number): ExpressionListContext;
	public expressionList(i?: number): ExpressionListContext | ExpressionListContext[] {
		if (i === undefined) {
			return this.getRuleContexts(ExpressionListContext);
		} else {
			return this.getRuleContext(i, ExpressionListContext);
		}
	}
	constructor(parent: ParserRuleContext | undefined, invokingState: number) {
		super(parent, invokingState);
	}
	// @Override
	public get ruleIndex(): number { return CymbolParser.RULE_functionCall; }
	// @Override
	public enterRule(listener: CymbolListener): void {
		if (listener.enterFunctionCall) {
			listener.enterFunctionCall(this);
		}
	}
	// @Override
	public exitRule(listener: CymbolListener): void {
		if (listener.exitFunctionCall) {
			listener.exitFunctionCall(this);
		}
	}
	// @Override
	public accept<Result>(visitor: CymbolVisitor<Result>): Result {
		if (visitor.visitFunctionCall) {
			return visitor.visitFunctionCall(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class FieldsCallContext extends ParserRuleContext {
	public primary(): PrimaryContext {
		return this.getRuleContext(0, PrimaryContext);
	}
	public ID(): TerminalNode[];
	public ID(i: number): TerminalNode;
	public ID(i?: number): TerminalNode | TerminalNode[] {
		if (i === undefined) {
			return this.getTokens(CymbolParser.ID);
		} else {
			return this.getToken(CymbolParser.ID, i);
		}
	}
	constructor(parent: ParserRuleContext | undefined, invokingState: number) {
		super(parent, invokingState);
	}
	// @Override
	public get ruleIndex(): number { return CymbolParser.RULE_fieldsCall; }
	// @Override
	public enterRule(listener: CymbolListener): void {
		if (listener.enterFieldsCall) {
			listener.enterFieldsCall(this);
		}
	}
	// @Override
	public exitRule(listener: CymbolListener): void {
		if (listener.exitFieldsCall) {
			listener.exitFieldsCall(this);
		}
	}
	// @Override
	public accept<Result>(visitor: CymbolVisitor<Result>): Result {
		if (visitor.visitFieldsCall) {
			return visitor.visitFieldsCall(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class MethodCallContext extends ParserRuleContext {
	public primary(): PrimaryContext {
		return this.getRuleContext(0, PrimaryContext);
	}
	public ID(): TerminalNode[];
	public ID(i: number): TerminalNode;
	public ID(i?: number): TerminalNode | TerminalNode[] {
		if (i === undefined) {
			return this.getTokens(CymbolParser.ID);
		} else {
			return this.getToken(CymbolParser.ID, i);
		}
	}
	public expressionList(): ExpressionListContext[];
	public expressionList(i: number): ExpressionListContext;
	public expressionList(i?: number): ExpressionListContext | ExpressionListContext[] {
		if (i === undefined) {
			return this.getRuleContexts(ExpressionListContext);
		} else {
			return this.getRuleContext(i, ExpressionListContext);
		}
	}
	constructor(parent: ParserRuleContext | undefined, invokingState: number) {
		super(parent, invokingState);
	}
	// @Override
	public get ruleIndex(): number { return CymbolParser.RULE_methodCall; }
	// @Override
	public enterRule(listener: CymbolListener): void {
		if (listener.enterMethodCall) {
			listener.enterMethodCall(this);
		}
	}
	// @Override
	public exitRule(listener: CymbolListener): void {
		if (listener.exitMethodCall) {
			listener.exitMethodCall(this);
		}
	}
	// @Override
	public accept<Result>(visitor: CymbolVisitor<Result>): Result {
		if (visitor.visitMethodCall) {
			return visitor.visitMethodCall(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class PrimaryContext extends ParserRuleContext {
	public INT(): TerminalNode | undefined { return this.tryGetToken(CymbolParser.INT, 0); }
	public ID(): TerminalNode | undefined { return this.tryGetToken(CymbolParser.ID, 0); }
	public expression(): ExpressionContext | undefined {
		return this.tryGetRuleContext(0, ExpressionContext);
	}
	constructor(parent: ParserRuleContext | undefined, invokingState: number) {
		super(parent, invokingState);
	}
	// @Override
	public get ruleIndex(): number { return CymbolParser.RULE_primary; }
	// @Override
	public enterRule(listener: CymbolListener): void {
		if (listener.enterPrimary) {
			listener.enterPrimary(this);
		}
	}
	// @Override
	public exitRule(listener: CymbolListener): void {
		if (listener.exitPrimary) {
			listener.exitPrimary(this);
		}
	}
	// @Override
	public accept<Result>(visitor: CymbolVisitor<Result>): Result {
		if (visitor.visitPrimary) {
			return visitor.visitPrimary(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


export class TypeContext extends ParserRuleContext {
	public ID(): TerminalNode { return this.getToken(CymbolParser.ID, 0); }
	constructor(parent: ParserRuleContext | undefined, invokingState: number) {
		super(parent, invokingState);
	}
	// @Override
	public get ruleIndex(): number { return CymbolParser.RULE_type; }
	// @Override
	public enterRule(listener: CymbolListener): void {
		if (listener.enterType) {
			listener.enterType(this);
		}
	}
	// @Override
	public exitRule(listener: CymbolListener): void {
		if (listener.exitType) {
			listener.exitType(this);
		}
	}
	// @Override
	public accept<Result>(visitor: CymbolVisitor<Result>): Result {
		if (visitor.visitType) {
			return visitor.visitType(this);
		} else {
			return visitor.visitChildren(this);
		}
	}
}


